import json


class Todo:
    id_s = 0

    @classmethod
    def add_id(cls):
        Todo.id_s += 1
        return Todo.id_s

    def __init__(self, title: str = '', id: int = 0, completed=False):
        self.id = id if id > 0 else Todo.add_id()
        self.title = title
        self.completed = completed
